
//手机类
class Phone {
    //属性/成员变量
    public String Battery;//电池
    public String chip;//芯片
    public String pixel;//像素
    public String colour;//颜色
    public int weight;//重量
    //成员方法/功能
    public void photograph() {//拍照
        System.out.println("拍照");
    }
    public void ring_up() {//打电话
        System.out.println("打电话");
    }
    public void get(Phone this ,int weight) {
        this.weight=weight;
    }
}
class Dog {
    // 狗的属性
    public static String name;//名字
    public String color;//颜色
    public void sleep() {
        System.out.println(name + ": 睡觉");
    }
    // 狗的行为
    public void eat() {
        System.out.println(name + ": 吃饭");
    }
    public void maiMeng () {
        System.out.println(name+": 卖萌");
    }
    public static void show() {
        System.out.println("我是实例化对象");
    }
}
public class Test1 {
    public static void main(String[] args) {
        Phone phone=new Phone();
        phone.get(100);
        System.out.println(phone.weight);
    }
    public static void main1(String[] args) {
        Dog dog1=new Dog();
        Dog dog2=new Dog();
        Dog dog3=new Dog();
        Dog dog4=new Dog();
        Dog dog5=new Dog();
        dog1=dog2;
        dog1=dog3;
        dog1=dog4;
        dog1=dog5;
    }
}
